<%@page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />

<form id="pagerForm" method="post" action="findBorrowBrRtRn">
	<input type="hidden" name="pageNum" value="1" /> <input type="hidden"
		name="numPerPage" value="${numPerPage}" /> <input type="hidden"
		name="orderField" value="${orderField}" /> <input type="hidden"
		name="orderDirection" value="${orderDirection}" />
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);"
		action="findBorrowBrRtRn" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td><label> 借阅起始日期： <input type="text"
							name="startTime" class="date" id="startTime" value="${startTime}" />
					</label></td>
					<td><label> 借阅终止日期： <input type="text" id="endTime"
							name="endTime" class="date" value="${endTime}" />
					</label></td>
					<td><label> 图书类型： <s:select theme="simple"
								headerKey="" headerValue="图书类型" list="#request.sysParaList"
								id="bookType" name="bookType"></s:select>
					</label></td>
					<td><input type="hidden" name="functionNum"
						value="hxlbookad0005"> <label>读者编号：</label> <input
						type="text" id="readerId" name="readerId" value="${readerId}" /></td>
					<td><s:if test='returnOK == "OK"'>
							<input type="checkbox" name="returnOK" value="OK"
								checked="checked" />
						已归还
					</s:if>
						<s:else>
							<input type="checkbox" name="returnOK" value="OK" />
						已归还
					</s:else></td>
					<td><s:if test='returnNo == "NO"'>
							<input type="checkbox" name="returnNo" value="NO"
								checked="checked" />
						未归还
					</s:if> <s:else>
							<input type="checkbox" name="returnNo" value="NO" />
						未归还
					</s:else></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查看</button>
							</div>
						</div>
					</li>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button id="reset88">重置</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
		</ul>
	</div>
	<table class="table" layoutH="138" targetType="navTab" asc="asc"
		desc="desc">
		<thead>
			<tr>
				<th width="150" align="center">读者编号</th>
				<th width="150" align="center">读者姓名</th>
				<th width="300" align="center">标准书号</th>
				<th width="250" align="center">图书名称</th>
				<th width="150" align="center">借阅时间</th>
				<th width="150" align="center">借阅到期</th>
				<th width="150" align="center">续借时间</th>
				<th width="150" align="center">续借到期</th>
				<th width="150" align="center">归还时间</th>
				<th width="150" align="center">图书类型</th>
				<th width="150" align="center">图书作者</th>
				<th width="300" align="center">出版社</th>
				<th width="150" align="center">图书定价</th>
				<th width="180" align="center">捐赠人编号</th>
				<th width="180" align="center">捐赠人姓名</th>
				<th width="150" align="center">存放书架</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator id="brRtRn" value="brRtRnList">
				<tr target="sid_user" rel="${brRtRn.book.bookId}">
					<td>${brRtRn.brUser.userId}</td>
					<td>${brRtRn.brUser.userName}</td>
					<td>${brRtRn.book.isbn}</td>
					<td>${brRtRn.book.bookName}</td>
					<td>${brRtRn.borrowTime}</td>
					<td>${brRtRn.endBorrowTime}</td>
					<td>${brRtRn.renewTime}</td>
					<td>${brRtRn.endRenewTime}</td>
					<td>${brRtRn.returnTime}</td>
					<td>${brRtRn.book.bookType}</td>
					<td>${brRtRn.book.author}</td>
					<td>${brRtRn.book.press}</td>
					<td>${brRtRn.book.price}</td>
					<td>${brRtRn.book.donator.donatorId}</td>
					<td>${brRtRn.book.donator.donatorName}</td>
					<td>${brRtRn.book.bookrack}</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span> <select class="combox" name="numPerPage"
				onchange="navTabPageBreak({numPerPage:this.value})">
				<option <s:if test="numPerPage==1">selected="selected"</s:if>
					value="1">1</option>
				<option <s:if test="numPerPage==5">selected="selected"</s:if>
					value="5">5</option>
				<option <s:if test="numPerPage==10">selected="selected"</s:if>
					value="10">10</option>
				<option <s:if test="numPerPage==15">selected="selected"</s:if>
					value="15">15</option>
				<option <s:if test="numPerPage==20">selected="selected"</s:if>
					value="20">20</option>
			</select> <span>条，共${totalCount}条</span>
		</div>

		<div class="pagination" targetType="${targetType}"
			totalCount="${totalCount}" numPerPage="${numPerPage}"
			pageNumShown="10" currentPage="${pageNum}"></div>
	</div>
</div>

<script type="text/javascript">
$(function($) {
	$("#reset88").click(function() {
		$('#readerId').attr('value', "");
		$('#startTime').attr('value', "");
		$('#endTime').attr('value', "");
		$('#bookType').attr('value', "");
		$("input[name='returnOK']").each(function(){
		$(this).attr("checked",false);
		}); 
		$("input[name='returnNo']").each(function(){
		$(this).attr("checked",false);
		});  
	});
});
</script>